Returns the targetSdkVersion of the caller, or __ANDROID_API_FUTURE__ if there is no known target SDK version (for code not running in the context of an app).
Returns the API level of the device we're actually running on, or -1 on failure. The returned values correspond to the named constants in <android/api-level.h>, and is equivalent to the Java Build.VERSION.SDK_INT API.
Magic version number for an Android OS build which has not yet turned into an official release, for comparisons against __ANDROID_API__.
Names the Gingerbread API level (9), for comparisons against __ANDROID_API__.
Names the Ice-Cream Sandwich API level (14), for comparisons against __ANDROID_API__.
Names the Jellybean MR1 API level (17), for comparisons against __ANDROID_API__.
Names the Jellybean MR2 API level (18), for comparisons against __ANDROID_API__.
Names the Jellybean API level (16), for comparisons against __ANDROID_API__.
Names the KitKat API level (19), for comparisons against __ANDROID_API__.
Names the Lollipop MR1 API level (22), for comparisons against __ANDROID_API__.
Names the Lollipop API level (21), for comparisons against __ANDROID_API__.
Names the Marshmallow API level (23), for comparisons against __ANDROID_API__.
Names the Nougat MR1 API level (25), for comparisons against __ANDROID_API__.
Names the Nougat API level (24), for comparisons against __ANDROID_API__.
Names the Oreo MR1 API level (27), for comparisons against __ANDROID_API__.
Names the Oreo API level (26), for comparisons against __ANDROID_API__.
Names the Pie API level (28), for comparisons against __ANDROID_API__.
Names the "Q" API level (29), for comparisons against __ANDROID_API__.
__ANDROID_API__ is the API level being targeted. For the OS, this is __ANDROID_API_FUTURE__. For the NDK, this is set by the compiler/build system based on the API level you claimed to target.